import React, { Component } from 'react'
import axios from 'axios'
import Rights from './rights'
import Lefts from './lefts'
class Classify extends Component {
   state={
       arr:[]
   }
   componentDidMount(){
        axios.get('/list').then(res=>{
             this.setState({
                 arr:res.data.data
             })
        })
   }
   render() {
    let {arr}=this.state
    return (
      <div className='classify'>
          <div className='left'>
          {
            arr&&arr.length?<Lefts send={arr}></Lefts>:''
          }
          </div>
          <div className='right'>
          {
            arr&&arr.length?<Rights send={arr}></Rights>:''
          }
          </div>
      </div>
    )
  }
}

export default Classify
